1. Technical Field
The technical field relates generally to communication between computerized devices and, more specifically, to systems and methods for addressing devices coupled via a bus.
2. Background Discussion
Some networking standards that employ a shared bus topology have a wide installed base in industrial applications. These networking standards include MODBUS, CAN, I2C and many radio based networks such as WLAN, ZigBee and Bluetooth. There are sundry reasons for the success of these networks, and some include ease of implementation, low cost of materials and robust performance in noisy, industrial settings. Of these standards, networks implementing the MODBUS are particularly popular.
MODBUS is a byte-based communications protocol in which one device, referred to as a master, drives communication with one or more other devices, referred to as slaves. The specification for MODBUS includes in two parts: an application layer and a physical/link layer. The application layer protocol is a general definition for exchanging data between a master and slaves. Messages from the application layer are encapsulated in frames which are then transmitted across the physical/link layer. There are a number of different physical/link layer protocols defined for MODBUS, including MODBUS over Serial Line.
Modes of communication available according to the MODBUS protocol include broadcasts and transactions. A broadcast is a message transmitted by a master to all of the slaves coupled to a network including the master. Under a standard MODBUS implementation, slaves do not respond to broadcasts. Broadcasts can be used to send data from the master to all of the slaves.
In contrast, transactions are initiated by a request message that is unicast from the master to a single slave. Transactions are completed by a response message that is sent from the slave back to the master. Transactions can be used to send data from the master to a specific slave and to receive an acknowledgement at the master, or to retrieve data from a slave.
Devices that communicate via a shared bus topology are assigned addresses through a variety of methods. According to some methods, a person sets the address of a device by manually manipulating an element of the device, such as a dip switch. In other methods, a person configures the address of a device via a software application that stores the address within a memory located in the device. When configuring devices that communicate using a MODBUS protocol, such as MODBUS over Serial Line protocol, addresses are often configured during manufacture of the device or during its initial installation.
MODBUS over Serial Line is typically implemented on a RS-485 bus, and all of the devices coupled to the RS-485 bus may detect messages transmitted through the bus. MODBUS over Serial Line, therefore, uses addresses to uniquely identify each slave in the system. For transactions, the address of the slave targeted for a unicast is included in the outgoing message and specifies which slave should receive, process and respond to the message. For broadcasts, a special reserved address is included in the outgoing message which identifies it as a broadcast to be received and processed by all of the slaves.